-- card: 15375 from stack: in.5 -- bmap block id: 17388 -- flags: 0000 -- background id: 3858 -- name: RedrawDesktop ----- HyperTalk script ----- on HideObjects hide cd btn "Try It!" end HideObjects on ShowObjects show cd btn "Try It!" end ShowObjects -- part 1 (button) -- low flags: 00 -- high flags: A002 -- rect: left=74 top=190 right=224 bottom=176 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 8192 -- line height: 16 -- part name: Try It! ----- HyperTalk script ----- on mouseUp RedrawDesktop end mouseUp -- part contents for background part 38 ----- text ----- 38/50 -- part contents for background part 42 ----- text ----- { UpdateDesk()} { XCMD force a redraw of the desktop and all windows } {} { brought to you by: Anup Murarka Eric Carlson } { ALINK: SKEPTIC ALINK: cyNic } { CIS: 76004,3356 } {} { We are part of the Support Tools Development Group, } { Apple Computer, Inc. } {} { please DO NOT contack Mac DTS for support of this code! } {} { please DO contact the authors for support of this code! } {} { Send comments, bug reports, requests to any of the above } { E-mail addresses or to:} {} { (one of us) } { Apple Computer, Inc. } { 900 E. Hamilton, Ave. } { Campbell, CA 95008 } { M/S 72-L } {} { Copyright: © 1990 by Apple Computer, Inc., all rights reserved. } {} { written by Eric Carlson } { AppleLink: cyNic } { modification history } { Date Initials Comments } { ---- ------ ---------------------------------------------------- } { 4/18/90 ec first written } {} unit DiskIsLocked; interface uses HyperXCmd, XCmdIncludes, MiscUtils; procedure MAIN (paramPtr: XCmdPtr); implementation procedure UpdateDesk (paramPtr: XCmdPtr); const WindowListAddr = $9D6; var windowListPtr: ^WindowPeek; first: WindowPeek; begin if askedForHelp(paramPtr, 'UpdateDesk()', 'v1.0, ©1990 Apple Computer, Inc. by Eric Carlson') then exit(UpdateDesk); windowListPtr := Pointer(WindowListAddr); first := WindowListPtr^; PaintBehind(first, GetGreyRgn); end; procedure MAIN (paramPtr: XCmdPtr); begin UpdateDesk(paramPtr); end; end.{ unit UpdateDesk } -- part contents for background part 20 ----- text ----- This XCMD will force a redraw of all windows and the desktop, getting rid of all traces of the PlotPICT XCMD gone wild (or anything that draws outside of the area that it should). Calling syntax: RedrawDesktop